const mirrorVertical = function (imgData, amount, canvas) {
    let output = canvas.getContext('2d').createImageData(imgData.width, imgData.height)
    var w = imgData.width;
    var h = imgData.height;
    var dst = output.data;
    var d = imgData.data;
    for (let y = 0; y < h; y++) {
        for (let x = 0; x < w; x++) {
            let off = (y * w + x) * 4;
            let dstOff = ((h - y - 1) * w + x) * 4;
            dst[dstOff] = d[off];
            dst[dstOff+1] = d[off+1];
            dst[dstOff+2] = d[off+2];
            dst[dstOff+3] = d[off+3];
        }
    }
    return output;
}

export default mirrorVertical;